const mongoose = require('../db');

const Schema = mongoose.Schema;

const pro = new Schema({
    proid: { type: String },
    proname: { type: String },
    category: { type: String },
    brand: { type: String },
    logo: { type: String },
    proimg: { type: String },
    price: { type: Number },
    desc: { type: String },
    stock: { type: Number }, // 库存
    sales: { type: Number }, // 销量
    discount: { type: Number }, // 折扣
    rating: { type: Number } // 评分
});

const collection = mongoose.model('Pro',pro);

module.exports = collection;